Method for assigning semantic information to word through learning using text corpus

ABSTRACT

A method is provided for controlling a device based on acquired text data. The method includes acquiring the text data indicating a voice spoken by a user, and analyzing a meaning of the text data based on a table, in which a word and a vector representing a meaning of the word in a vector space of predetermined dimensions are associated. The method also includes generating a command to control the device based on the analyzed meaning of the text data. The table is generated by performing a learning process by assigning to a first word a first vector representing a meaning of the first word in the vector space, and by assigning to a second word a second vector representing a meaning of the second word in the vector space, in accordance with an arrangement of a word string in a first text corpus and a second text corpus.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of pending U.S. application Ser. No.15/176,114, filed Jun. 7, 2016, which claims priority of Japanese PatentApplication No. 2015-121670, filed Jun. 17, 2015. The disclosure ofthese documents, including the specifications, drawings, and claims areincorporated herein by reference in their entirety.

BACKGROUND 1. Technical Field

The present disclosure relates to an apparatus, a method, and anon-transitory computer-readable recording medium for generatingsemantic information concerning a word to deal with the meaning of textinformation in a natural language.

2. Description of the Related Art

Related art techniques generate semantic information for a word thatforms text to deal with the information of text information in a naturallanguage. The related art techniques are disclosed in Tomas Mikolov, KaiChen, Greg Corrado, and Jeffrey Dean, “Efficient Estimation of WordRepresentations in Vector Space”, ICLR 2013, and Tomas Mikolov, IlyaSutskever, Kai Chen, Greg Corrado, and Jeffrey Dean, “DistributedRepresentations of Words and Phrases and their Compositionality”, NIPS2013. The related art techniques learn a multi-dimensional vector to beassigned to each word contained in a large amount of text data sets(hereinafter referred to as a text corpus), and then output anassociation between a word and a multi-dimensional vector (semanticinformation) corresponding to the word.

The semantic information generated in the related art techniques may beused to determine whether words are similar in meaning.

In the related art techniques, however, semantic information assigned toa given word is similar to semantic information assigned to another wordwhich needs to be differentiated from the given word. There is stillroom for improvement in the determination as to whether the words aresimilar in meaning.

SUMMARY

In one general aspect, the techniques disclosed here feature a methodfor generating semantic information. The method includes acquiring afirst text corpus, including first text data of a first sentenceincluding a first word and described in a natural language, and secondtext data of a second sentence including a second word different inmeaning from the first word, with a second word distribution indicatingtypes and frequencies of words appearing within a predetermined rangeprior to and subsequent to the second word being similar to a first worddistribution within the predetermined range prior to and subsequent tothe first word in the first sentence, acquiring a second text corpusincluding third text data of a third sentence, including a third wordidentical to at least one of the first word and the second word, with athird word distribution within the predetermined range prior to andsubsequent to the third word being not similar to the first worddistribution, in accordance with an arrangement of a word string in thefirst text corpus and the second text corpus, performing a learningprocess by assigning to the first word a first vector representing ameaning of the first word in a vector space of predetermined dimensionsand by assigning to the second word a second vector representing ameaning of the second word in the vector space, and storing the firstvector in association with the first word, and the second vector spacedby a predetermined distance or longer from the first vector in thevector space in association with the second word.

The technique of the disclosure controls the similarity between a vectorassigned to a given word and a vector assigned to another word thatneeds to be differentiated from the given word, and is thus used todetermine whether the words are similar in meaning.

It should be noted that general or specific embodiments may beimplemented as a system, a method, an integrated circuit, a computerprogram, a storage medium, such as a computer-readable compact diskread-only memory (CD-ROM), or any selective combination thereof.

Additional benefits and advantages of the disclosed embodiments willbecome apparent from the specification and drawings. The benefits and/oradvantages may be individually obtained by the various embodiments andfeatures of the specification and drawings, which need not all beprovided in order to obtain one or more of such benefits and/oradvantages.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram illustrating a configuration of a wordsemantic information generation apparatus in accordance with anembodiment of the disclosure;

FIG. 2 is a block diagram illustrating an example of a configuration ofthe word semantic information generation apparatus when a word includedin a second text corpus is an antonym of a word included in a first textcorpus;

FIG. 3 illustrates an example of a text corpus employed as a generaltext corpus;

FIG. 4 illustrates an example of a text corpus employed as a generaltext corpus and including words in an antonym relationship;

FIG. 5 illustrates an example of text data stored on an antonym textcorpus;

FIG. 6 illustrates an example of a configuration of a neural networkused to calculate a probability of appearance;

FIG. 7 illustrates an example of text data used in a learning process;

FIG. 8 illustrates an example of a word represented by “1-of-K” vector;

FIG. 9 illustrates the neural network of FIG. 6 using vectors X, H,Y(−2), Y(−1), Y(+1), and Y(+2);

FIG. 10 is a flowchart illustrating a learning process of the wordsemantic information generation apparatus of an embodiment of thedisclosure;

FIG. 11 is a graph in which semantic vectors assigned to the word “appu”and the word “daun” are reduced to two dimensions through a principalcomponent analysis in a semantic vector table of a comparative exampleto the embodiment;

FIG. 12 is a graph in which semantic vectors assigned to the word “appu”and the word “daun” are reduced to two dimensions through the principalcomponent analysis in the semantic vector table of the embodiment;

FIG. 13 is a block diagram of a home electronics device as a first useexample of a semantic information table; and

FIG. 14 is a block diagram of a home electronics system as a second useexample of the semantic information table.

DETAILED DESCRIPTION Underlying Knowledge Forming Basis of the PresentDisclosure

The system of the related art for assigning a multi-dimensional vectorto a word is based on the principle that is called a distributionalhypothesis in the field of the natural language processing technique.The distributional hypothesis refers to the principle that words havinga similar meaning are used in the same context. In other words, thedistributional hypothesis refers to the principle that similar wordsappear prior to or subsequent to the words having a similar meaning. Forexample, Tomohide SHIBATA and Sadao KUROHASHI, “Context-dependentSynonymous Predicate Acquisition”, Information Processing Society ofJapan, Vol. 2010-NL-199 No. 13 has pointed out that words generally inan antonym relationship are similar in context, in other words,sequences of words prior to or subsequent to the words are likely tomatch each other or to be similar.

For example, the word “agaru (increases)” and the word “appusuru (isup)” are respectively typically used in a sentence“bonus/ga/agaru/to/ureshii” (I am happy if the bonus increases) and asentence “bonus/ga/appusuru/to/ureshii” (I am happy if the bonus is up).In this case, the word string “bonus/ga” and the word string“to/ureshii” are common in two sentences. In the related art techniquebased on the distributional hypothesis, vectors having close values areassigned to words having similar contexts prior thereto and subsequentthereto in a text corpus. As a result, in the related art techniquebased on the distributional hypothesis, the words are converted tomulti-dimensional vectors, and the words are determined to be similar inmeaning depending on whether the resulting multi-dimensional vectors aresimilar.

However, the related art technique based on the distributionalhypothesis suffers from the problem that antonyms mutually opposite inmeaning have vectors having close values. For example, words“joushousuru” (rises), and “gerakusuru (falls) may appear a sentence“kabuka/wa/joushousuru/darou” (stock prices will rise) and“kabuki/wa/gerakusuru/darou” (stock prices will fall). “kabuka/ga” and“darou” commonly appear as preceding a context and a subsequent context.Based on the distributional hypothesis that words similar in meaning areused in the same context, the antonyms “joushousuru” and “gerakusuru”may be determined to have similar meaning.

Japanese Unexamined Patent Application Publication No. 2002-334077discloses another technique that differentiates word in an antonymrelationship. The disclosed technique is based on the construction of aconcept base that expresses the meaning of each word with a combinationof multiple attribute values. Since words in an antonym relationship inthe concept base may have different attribute values, the words are thusdifferentiated. For example, words “an upper layer” and “a lower layer”may have an attribute value called “height”. The “upper layer” has aheight of a positive attribute value, and the “lower layer” has a heightof a negative attribute value. The words “upper layer” and “lower layer”are thus expressed to be in an antonym relationship.

In accordance with the technique disclosed in Japanese Unexamined PatentApplication Publication No. 2002-334077, an attribute value is manuallydescribed such that the words in an antonym relationship have differentattribute values, or an attribute value is learned from languageresource data, such as a text corpus, through an appropriate learningmethod. Japanese Unexamined Patent Application Publication No.2002-334077 does not mention a specific learning method that setsdifferent attribute values to the antonyms.

The technique disclosed in the paper “Context-dependent SynonymousPredicate Acquisition”, Information Processing Society of Japan, Vol.2010-NL-199 No. 13 has simply pointed out that words generally in anantonym relationship are similar in context, and does not specificallymention a solution to solve the problem of the related art of thedistribution hypothesis.

The related art techniques are unable to assign to antonyms semanticinformation that appropriately clarifies a difference therebetween,through learning from the text corpus.

To solve the above problem, there is provided a method for generatingsemantic information. The method includes

acquiring a first text corpus, including first text data of a firstsentence including a first word and described in a natural language, andsecond text data of a second sentence including a second word differentin meaning from the first word, with a second word distributionindicating types and frequencies of words appearing within apredetermined range prior to and subsequent to the second word beingsimilar to a first word distribution within the predetermined rangeprior to and subsequent to the first word in the first sentence;

acquiring a second text corpus including third text data of a thirdsentence, including a third word identical to at least one of the firstword and the second word, with a third word distribution within thepredetermined range prior to and subsequent to the third word being notsimilar to the first word distribution;

in accordance with an arrangement of a word string in the first textcorpus and the second text corpus, performing a learning process byassigning to the first word a first vector representing a meaning of thefirst word in a vector space of predetermined dimensions and byassigning to the second word a second vector representing a meaning ofthe second word in the vector space; and

storing the first vector in association with the first word, and thesecond vector spaced by a predetermined distance or longer from thefirst vector in the vector space in association with the second word.

In this way, through the learning process from the text corpus, themethod assigns, to a given word and another word that is to bedifferentiated from the given word, semantic information thatdifferentiates between the two words.

More specifically, the method acquires the first text corpus thatreflects the use of an actual word and the second text corpus that isproduced such that word strings near a word that needs to bedifferentiated in meaning from the first word are not similar. Sincevectors are generated as semantic information of the words from the twotext corpuses, information that the word needed to be differentiated isused in a different context is reflected in the learning process of thesemantic information of the word. As a result, the method is free fromthe problem associated with the related art techniques that the wordneeded to be differentiated becomes similar in meaning.

Since the semantic information expressed by the vectors of thepredetermined dimensions is assigned to the first word, similaritybetween the first words is appropriately determined using a distancebetween the vectors.

The second text corpus includes the third word and a fourth word that isartificially produced and does not appear in text data of the naturallanguage, and a word included in the predetermined range prior to andsubsequent to the third word is the fourth word in the third text data.

The inclusion of the artificial word in the second text corpus reducesan adverse effect involved in the assignment of the semantic informationto the word in the natural language in the text corpus. If a word nearthe third word is replaced with a word in the natural language, thesemantic information of that word is affected by the context of thesecond text corpus and the semantic information different from thesemantic information that is originally intended may be assigned to theword. The present embodiment is free from the above problem by replacinga word near the third word with the fourth word.

The first text data and the second text data may include a word in afirst language, and in the third text data, the third word may be a wordin the first language, and a word within the predetermined range priorto and subsequent to the third word is a word in a second languagedifferent from the first language.

The second word may be an antonym of the first word.

In this way, the antonyms, such as “raise” and “fall” are appropriatelydifferentiated.

The second word may be similar in meaning to the first word, butdifferent in terms of a degree of similarity from the first word.

In this way, the words “good”, “better”, and “best” that are similar inmeaning may be appropriately differentiated in the degree of similarity.

The second word may be identical in concept to the first word, butdifferent in attribute from the first word.

In this way, the words “red”, “blue”, and “green” belonging to the sameconcept “color” are thus appropriately differentiated.

The learning process may be performed using a neural network.

The semantic information is appropriately assigned to the first word andthe second word in a differentiated fashion by learning the first andsecond text corpuses using the neural network.

The learning process may be performed using latent semantic indexing.

The semantic information is appropriately assigned to the first word andthe second word in a differentiated fashion by learning the first andsecond text corpuses using latent semantic indexing.

The learning process may be performed using probabilistic semanticindexing.

The semantic information is appropriately assigned to the first word andthe second word in a differentiated fashion by learning the first andsecond text corpuses using probabilistic semantic indexing.

The vector space of the predetermined dimensions may have a number ofdimensions equal to a number of different types of words appearing inthe first text corpus and the second text corpus.

Since this arrangement allows the semantic information to be representedby vectors having the number of dimensions equal to the number of typesof words appearing in the first and second text corpuses, each worddifferent in type is represented by a 1-of-K vector, and thusrepresented by a symbol string appropriate for learning.

The first text corpus may include text data in the natural language thatis used to instruct a device to perform an operation, and the first wordand the second word may be related to contents of the operation of thedevice.

Sentences “please raise the temperature”, “please lower thetemperature”, “please turn on the air conditioner in the bedroom”, and“please turn on the air conditioner in the living room” are similar buttarget devices are different. The difference is appropriatelydifferentiated such that an erroneous operation to the intended deviceis controlled.

The first text corpus may include text data in the natural language thata patient uses i to describe a symptom of the patient in a medicaldiagnosis, and the first word is related to a state of the patient'sbody.

Descriptions of symptom, such as “my head has been hurting for thesethree days”, and “I have been dizzy for these three days”, are similarin word string, but different in meaning. These word strings areappropriately differentiated, reducing the possibility of a wrongdiagnosis.

The first text corpus may include text data in the natural language thatis used to describe or to treat a symptom of a patient in a medicaldiagnosis, and the first word may be related to a region of thepatient's body.

Sentences “my right hand has been hurting for these three days”, and “mystomach has been hurting for these three days”, or sentences “cool yourhead”, and “cool your right foot” are similar in word string butdifferent in description of symptom or treatment of symptom. These wordstrings are appropriately differentiated, reducing the possibility of awrong diagnosis or a wrong treatment.

The first text corpus may include text data in the natural language thatis used to describe a treatment applied to a symptom of a patient in amedical diagnosis, and the first word may be related to contents of thetreatment of the patient.

Description of symptoms “keep an affected area warm” and “cool anaffected area” are similar in word string, but different in meaning.These word strings are appropriately differentiated, reducing a wronginstruction about the treatment.

The disclosure implements not only a word semantic informationgeneration method configured to execute the characteristic processdescribed above, but also a word semantic information generationapparatus including a processor configured to execute characteristicsteps included in the method. The disclosure also implements a computerprogram causing a computer to execute the characteristic steps in theword semantic information generation method. In accordance with thedisclosure, the computer program may be circulated using anon-transitory computer-readable recording medium, such as CD-ROM, orvia a communication network, such as the Internet.

Embodiments of the disclosure are described below with reference to thedrawings. The embodiments described below are general or specificembodiments of the disclosure. Elements, and numerical values, andshapes of the elements, steps, and the order of the steps in theembodiments are described for exemplary purposes only, and are notintended to limit the disclosure. Among the elements in the embodiments,elements not described in the independent claims indicative of higherconcepts may be described as optional elements. Elements in theembodiments may be combined.

Embodiment

FIG. 1 is a block diagram illustrating a configuration of a wordsemantic information generation apparatus in accordance with anembodiment of the disclosure. The word semantic information generationapparatus is a computer, for example, and includes a memory 110, aprocessor 120, a memory 130, and an operation unit 108. Each of thememories 110 and 130 may a rewritable non-volatile memory, such as of ahard disk drive type or a solid-state drive type. The memory 110 storesa first text corpus 101 and a second text corpus 102. The memory 130stores a semantic information table 107.

The processor 120 may be a processor, such as a central processing unit(CPU), an application-specific integrated circuit (ASIC), or afield-programmable gate array (FPGA), and includes an acquisition unit103, a semantic information learner 104, a semantic information manager105, and a corpus generator 106. The operation unit 108 may include aninput device, such as a keyboard or a mouse, and a display deviceconfigured to display information.

Blocks in the memory 110, the processor 120, and the memory 130 areimplemented when the CPU executes a computer program that causes thecomputer to function as the word semantic information generationapparatus.

The first text corpus 101 is an aggregate of text data in apredetermined unit including a word that serves as a generation targetof the semantic information (for example, text data including a sentenceas a unit). The text data is stored on the first text corpus 101 in aunit-of-word segmented state. One sentence is a word string that isended with a punctuation mark (such as a period in English, or a smallblank circle in Japanese).

The first text corpus 101 includes the aggregate of at least one pieceof text data in which a word having a predetermined meaning (hereinafterreferred to as a “first word”) appears, and at least one piece of textdata in which a word that is differentiated from the first word(hereinafter referred to as a “second word”) appears.

The second text corpus 102 is an aggregate of at least one piece of textdata in which a word identical to at least one of the first word and thesecond word (hereinafter referred to as a “third word”) appears.

The text data in which the third word appears in the second text corpus102 may be text data in a natural language, or text data including aword that is artificially produced and does not appear in a naturallanguage (hereinafter referred to as a “fourth word”). If the fourthword is used, it is sufficient if the text data including the third wordis constructed such that a distribution of a word string near the thirdword is set to be different from a distribution of a word string nearthe first word or the second word appearing in the text data included inthe first text corpus 101. The “distribution of the word string near theword” is intended to mean the types of a word and the frequency ofappearances of the word within a predetermined range prior to andsubsequent to a target word. For example, in a sentence “onryou wo agete te kudasai” (please increase the volume), the distribution of theword string prior to and subsequent to a target word “age” is one wordof onryou”, one word of “wo”, one word of “te”, and one word of“kudadasai”. The predetermined range prior to and subsequent to thetarget word may include the whole sentence, or a predetermined number ofwords including part of the whole sentence (three words, for example).The “distribution of the word string” may account for the order ofappearance of the word in addition to the types of the word and thefrequency of appearances of the word. The inclusion of the fourth wordin the text data reduces an adverse effect that may be caused when thesemantic information is assigned to a word in the natural language inthe text corpus.

If a word near the third word is replaced with a word in a naturallanguage, there is a possibility that the semantic information of thatword in the natural language is affected by the context of the secondtext corpus 102, and that semantic information different from thesemantic information that is to be originally intended to that word isassigned to that word. In accordance with the disclosure, the word nearthe third word is thus replaced with a fourth word.

The fourth word may be a symbol not typically used in the naturallanguage, such as “#”, “!”, “″”, “$”, or “&”, or a symbol string formedof a combination thereof. If the same symbol string is frequently usedas the fourth word, there is a possibility that similar semanticinformation is assigned to the third word. For example, a symbol or asymbol string, different from text data to text data, forming the secondtext corpus 102, may be used. Alternatively, a symbol or a symbolstring, different from replacement target word to replacement targetword, may be used. Alternatively, words having similar target words mayuse the same symbol or the same symbol string.

In the second text corpus 102, a word string near the third word may betext data in a natural language different from the word string near thefirst word. For example, text data “the room will become cool if the airconditioner is turned on” may be included in the first text corpus 101.In this case, a phrase opposite in meaning to the phrase “turned on” is“turned off”, and the second text corpus 102 may include text data “theroom will become hot if the air conditioner is turned off”. The secondtext corpus 102 is thus constructed such that text data having a word of“hot” that is an antonym of “cool” is near “turned off”.

If the first and second text corpuses 101 and 102 are constructed in afirst predetermined language (for example, Japanese), a word string nearthe third word may be constructed in a second language (for example,English) different from the first language. For example, a text corpus“Eakon wo ireru to suzushii” (The room becomes cool if the airconditioner is turned on) may be included in the first text corpus 101.The second text corpus 102 may be text data“APPLE/APPLE/ireru/APPLE/APPLE” with “eakon/wo” replaced with“APPLE/APPLE”, and “to/suzushii” replaced with “APPLE/APPLE”.

Examples of the second word included in the first text corpus 101 andthe third word included in the second text corpus 102 may include (1) anantonym of the first word included in the first text corpus 101, (2) aword similar in meaning but different in the degree of similarity fromthe first word included in the first text corpus 101, and (3) a wordbelonging to the same concept as the first word but different inattribute from the first word in the first text corpus 101.

In the case of antonyms, “ageru” (raise) and “sageru” (lower) may bedifferentiated. If the words are similar but different in the degree ofsimilarity, “good”, “better”, and “best”, which are similar butdifferent in the degree of similarity, may be differentiated. Words maybelong to the same concept but different in attribute. For example,“red”, “blue”, and “green” that fall within the same concept of “color”may be differentiated as words different in attribute.

The acquisition unit 103 acquires the first text corpus 101 and thesecond text corpus 102. If the memory 110 is a local storage device, theacquisition unit 103 may simply read the first and second text corpuses101 and 102 from the memory 110. If the memory 110 is an externalstorage device connected via a communication network, the acquisitionunit 103 accesses the memory 110 via the communication network, and thenacquires the first and second text corpuses 101 and 102.

The semantic information learner 104 treats as a target word a wordappearing in the text data contained in the first text corpus 101 andthe second text corpus 102. The semantic information learner 104performs a learning process to assign semantic information to the targetword such that the target word is similar in meaning to a word that issimilar to the target word in terms of a distribution of a word stringappearing within a predetermined range prior to and subsequent to thetarget word.

The semantic information to be assigned to the target word may beexpressed so that a semantic vector having a predetermined dimensionnumber differentiates the semantic information. In this way, the degreeof similarity between the words is appropriately determined using adistance between the semantic vectors.

The semantic vector has a number of dimensions equal to the number oftypes of words appearing in the first and second text corpuses 101 and102. The words different in type may be expressed in 1-of-K vector, andthus expressed by a symbol string appropriate for learning.

The semantic information may be expressed by coordinates information ofa point corresponding to an end point of a vector rather than by avector in a vector space of predetermined dimensions.

The semantic information may be expressed in a predetermined format thatallows to be calculated the degree of similarity indicating how much thewords are similar in meaning. The predetermined format that allows thedegree of similarity to be calculated may be the semantic vector, or adistance from a reference point (such as the origin) to the front end ofeach semantic vector in the vector space. If the distance is used, wordsplaced at the same distance from the reference point are notdifferentiated from each other, but words placed at different distancesfrom the reference point are differentiated from each other. Since thedegree of similarity is represented by a scalar quantity in such a case,a workload to calculate the degree of similarity between the words isreduced.

The semantic information learner 104 may use a neural network, latentsemantic indexing or probabilistic semantic indexing in the learningprocess.

The semantic information manager 105 manages the semantic informationtable 107 that indicates the assignment state of the semanticinformation to the target word as a result of learning by the semanticinformation learner 104. The “target word” indicates a word that servesas a target to which the semantic information is assigned, and includesthe first word and the third word. The fourth word may or may not be thetarget word.

The semantic information table 107 stores, in a table format, anassociation between each word and the semantic information assigned tothe word.

The corpus generator 106 generates the second text corpus 102 using thefirst text corpus 101. The second text corpus 102 may be artificially orautomatically generated. If the second text corpus 102 is artificiallygenerated, the corpus generator 106 may generate the second text corpus102 in response to an operation that is performed by an operator usingthe operation unit 108. The operator may enter an operation to edit thefirst text corpus 101 one sentence by one sentence, thereby causing thecorpus generator 106 to generate the second text corpus 102.

When the second text corpus 102 is automatically generated, the corpusgenerator 106 extracts from the text data forming the first text corpus101 a pair of words having meanings in a predetermined relationship asthe first and third words. The corpus generator 106 replaces a wordstring appearing within a predetermined range prior to and subsequent tothe extracted first word with a predetermined word, and replaces a wordstring appearing within a predetermined range prior to and subsequent tothe extracted third word with a predetermined word. The corpus generator106 then stores the resulting text data on the second text corpus 102.The predetermined word may be the fourth word or the second word. Usingpredetermined different words, the corpus generator 106 performs thereplacement operation on the text data including the first word, and thetext data including the third word paired with the first word. When thefirst word and the third word, having meanings in a predeterminedrelationship, are extracted, the corpus generator 106 may use anassociation table in which an association relationship between the wordsis registered in advance. If an antonym is used as the third word, theassociation table may register the association relationship, such as“hot”-“cool”, in advance. The corpus generator 106 may not necessarilyhave to perform the word replacement on the text data including thefirst word.

In an example described below, a word included in the second text corpus102 is an antonym of a word included in the first text corpus 101.

FIG. 2 is a block diagram illustrating an example of a configuration ofthe word semantic information generation apparatus when a word includedin the second text corpus 102 is an antonym of a word included in thefirst text corpus 101. Referring to FIG. 2, elements identical to thoseof FIG. 1 are designated with the same reference numerals and thediscussion thereof is omitted.

As illustrated in FIG. 2, a general text corpus 201 is an aggregate ofmultiple pieces of text data in predetermined units including a wordthat is a target of the semantic information (for example, text dataincluding a sentence handled as a unit).

FIG. 3 illustrates an example of text corpuses 201A and 201B employed asthe general text corpus 201. Referring to FIG. 3, the text corpus 201Ais an example of a Japanese general text corpus 201. Japanese istypically described in a character string of words with no delimitation.Morphological analysis software (such as MeCab) may derive word stringdata delimited by word unit from character string data with no worddelimitation. In the example of FIG. 3, a unit of the text data includedin the text corpus 201A is a unit of sentence. Multiple pieces of textdata in the text corpus 201A are respectively identified byidentification numbers (ID as illustrated in FIG. 3). The text corpus201A also stores words in the order of appearance forming each piece oftext data. Each word in the text data is identified by index information(W1 through W6 of FIG. 3).

Referring to FIG. 3, the text corpus 201B is an example of an Englishgeneral text corpus 201. English is typically a character string that isdelimited by a space, and the character string is segmented by eachspace to obtain word string data. As in the text corpus 201A, the unitof text data is a unit of sentence in the text corpus 201B, and the textdata is identified by identification information (ID of FIG. 3). As inthe text corpus 201A, each word in the text data is identified by indexinformation (W1 through W5 of FIG. 3) in the text corpus 201B.

FIG. 4 illustrates text corpuses 201C and 201D used as a general textcorpus 201. The text corpuses 201C and 201D include words in an antonymrelationship. The text corpus 201C is a Japanese text corpus, andincludes text data where “age” (raise) appears, and text data where“sage” (lower) appears. The text corpus 201C includes another textcorpus, and includes text data where “appu” (up) appears, and text datawhere “daun” (down) appears.

Word strings appearing prior to and subsequent to words “age” and “sage”are “onryou/wo” and “te/kudasai” and are common to the words. Wordstrings appearing prior to and subsequent to words “appu” and “daun” are“ondo/wo” and “shi/te/hoshii” and are common to the words. As describedin the paper “Context-dependent Synonymous Predicate Acquisition”,Information Processing Society of Japan, Vol. 2010-NL-199 No. 13, anantonym has typically a similar context where an antonym appears. Morespecifically, word strings prior to and subsequent to an antonym matchor are similar to each other.

The text corpus 201D is an example of an English text corpus, andincludes text data where “increase” appears, and text data where“decrease” appears. The text corpus 201D also includes text data where“raise” appears, and text data where “lower” that is an antonym of“raise” appears. In this example, word strings prior to and subsequentto “increase” and “decrease” are “please” “the/volume” and are thuscommon to the words. Word strings prior to and subsequent to “raise” and“lower” are “please” “the/temperature” and are thus common to the words.

The phenomenon that the contexts including a word and an antonym of theword look similar is commonly recognized not only both in Japanese andEnglish but also in other languages.

The antonym text corpus 202 of FIG. 2 is an aggregate of text data inpredetermined units (for example, text data in units of sentences)including at least one of words in an antonym relationship in thegeneral text corpus 201. As the general text corpus 201, the text datain the antonym text corpus 202 is segmented by the word unit and thenstored.

FIG. 5 illustrates an example of text data stored in the antonym textcorpus 202. Referring to FIG. 5, a text corpus 202A is an example of aJapanese antonym text corpus 202. The text corpus 202A includes textdata where “age” appears, and text data where “sage” appears. In thetext data where “age” appears, word strings appearing prior to andsubsequent to “age” are “#U1#/#U1#”, and “#U1#/#U1#”. In other words, asillustrated in FIG. 4, the text data reading “onryou/wo/age/te/kudasai”is replaced with “#U1#/#U1#/age/#U1#/#U1#”.

On the other hand, word strings appearing prior to and subsequent to“sage” are “#D1#/#D1#”, and “#D1#/#D1#”. In other words, as illustratedin FIG. 4, the text data reading “onryou/wo/sage/te/kudasai” is replacedwith “#D1#/#D1#/age/#D1#/#D1#”.

The words (symbols) “#U1#” and “#D1#” are examples of the fourth word,and is an artificially generated words that do not appear in naturallanguages. More specifically, the words (symbols) “#U1#” and “#D1#” donot appear in the text data of the general text corpus 201.

The text corpus 202A is generated using the fourth words “#U1#” and“#D1#” such that the word strings prior to and subsequent to “age” and“sage” are different. The same is true of “appu” and “daun” in anantonym relationship. The text corpus 202A is generated using the fourthwords “#U2#” and “#D2#” such that word strings prior to and subsequentto “appu” and “daun” are different. If the learning process is performedusing the text corpuses 201A and 202A, the semantic information may beassigned such that the antonyms are clearly differentiated.

Referring to FIG. 5, the text corpus 202B is an example of an Englishversion of the antonym text corpus 202. The text corpus 202B includestext data where “increase” appears, and text data where “decrease” thatis an antonym of “increase” appears. In these two pieces of text data,word strings appearing prior to and subsequent to “increase” are “#INC#”and “#INC#/#INC#. Referring to FIG. 4, the text data reading“please/increase/the/volume” is replaced with“#INC#/increase/#INC#/#INC#.

On the other hand, the word strings appearing prior to and subsequent to“decrease” are “#DEC# and “#DEC#/#DEC#”. Referring to FIG. 4, the textdata reading “please/decrease/the/volume” is replaced with“#DEC#/decrease/#DEC#/#DEC#.

As in the text corpus 202A, the words (symbols) “#INC#” and “#DEC#” areexamples of the fourth word, and are artificially generated words thatdo not appear in a typical natural language.

The text corpus 202B is generated using the fourth words “#INC#” and“#DEC#” such that the word strings prior to and subsequent to “increase”and “decrease” in an antonym relationship are different. Concerning“raise” and “lower” in an antonym relationship, the text corpus 202B isgenerated using fourth words “#UP#” and “#DW#” such that words appearingprior to and subsequent to “raise” and “lower” become different.Learning the text corpuses 201B and 202B causes the semantic informationto be assigned such that a word and the antonym of the word are clearlydifferentiated.

Referring to FIG. 5, one or two words immediately prior to orimmediately subsequent to the target word are replaced with the fourthword. The disclosure is not limited to this arrangement. Three or morewords immediately prior to or immediately subsequent to the target wordare replaced with the fourth word. The disclosure is not limited to thisarrangement. The number of words, to be replaced with the fourth word,immediately prior to or immediately subsequent to the target word maynot necessarily have to be equal to the number of words immediatelyprior to or immediately subsequent to the target word in the generaltext corpus 201. In the text corpus 202B, one word immediately prior to“increase” or “decrease” is replaced. Alternatively, the word may bereplaced with two or more fourth words or one or less fourth word.

A word immediately prior to or immediately subsequent to “increase” or“decrease” is replaced in the text corpus 202B, because there is oneword immediately prior to or immediately subsequent to “increase” or“decrease” in the original text data. If there are two or more wordsimmediately prior to or immediately subsequent to “increase” or“decrease”, the two or more words are replaced with the fourth word.

As illustrated in FIG. 5, the same fourth word is used in a single pieceof text data. This is described for exemplary purposes only, and adifferent fourth word may be used for a different target word to bereplaced.

As illustrated in FIG. 2, an acquisition unit 203 acquires the generaltext corpus 201 and the antonym text corpus 202.

With reference to FIG. 2, a semantic vector learner 204 (part of asemantic information learner) uses the text data included in the generaltext corpus 201 and the text data included in the antonym text corpus202. The semantic vector learner 204 performs the learning process toassign a semantic vector (an example of the semantic information) to atarget word appearing in the text corpus such that the target word issimilar in meaning to a word that is similar to the target word in termsof a distribution of a word string appearing within a predeterminedrange prior to and subsequent to the target word. The semantic vector isnumerical information of at least one dimension that represents themeaning of a word.

A semantic vector manager 205 (an example of a semantic informationmanager) manages a semantic vector table 207 (an example of the semanticinformation) that is a learning result of the semantic vector learner204 and indicates an assignment state of the semantic information to thetarget word.

As the corpus generator 106, a corpus generator 206 generates theantonym text corpus 202 from the general text corpus 201.

The semantic vector table 207 stores in a table an associationrelationship between each word and a semantic vector responsive to theword.

The assignment of a semantic vector to a word is based on the principlethat semantic vectors having close values are assigned to words havingsimilar contexts, namely, words having similar word strings appearingprior thereto or subsequent thereto. Learning systems that learn thesemantic vector, based on the principle, are implemented using thetechniques disclosed in Tomas Mikolov, Kai Chen, Greg Corrado, andJeffrey Dean, “Efficient Estimation of Word Representations in VectorSpace”, ICLR 2013, and Tomas Mikolov, Ilya Sutskever, Kai Chen, GregCorrado, and Jeffrey Dean, “Distributed Representations of Words andPhrases and their Compositionality”, NIPS 2013.

In accordance with the present embodiment, semantic information isassigned to a word using the technique disclosed in the paper“Distributed Representations of Words and Phrases and theirCompositionality”. The technique disclosed in the paper “DistributedRepresentations of Words and Phrases and their Compositionality” isbriefly described. As in formula (1), the semantic vector learner 204expresses the text data with a word string W including the number ofwords T (T is an integer equal to 1 or above). More specifically, thesemantic vector learner 204 extracts all words appearing in all the textdata included in the general text corpus 201 and the antonym text corpus202, and replaces each word with a 1-of-K vector, and then organizes thetext data as the word string W as a 1-of-K string.

$\begin{matrix}{{W = w_{1}},w_{2},w_{3},\ldots,w_{T}} & (1) \\{\frac{1}{T}{\sum\limits_{t = 1}^{T}\; {\sum\limits_{{{- c} \leq j \leq c},{j \neq 0}}{\log \mspace{14mu} {p\left( w_{t + j} \middle| w_{t} \right)}}}}} & (2)\end{matrix}$

The objective of the learning process is maximizing a value defined byformula (2).

Formula (2) means that a logarithm sum of a conditional appearanceprobability of c words wt+j (c is an integer equal to or above 1)appearing prior to and subsequent to a word wt placed at a t-th positionof a word string W is averaged with respect to each of all words of theword string W. Here, j represents an index that identifies c wordsappearing prior to and subsequent to the word wt, and is represented byan integer within a range of −c through c except zero. Maximizingformula (2) means that the word wt+j output in response to the inputtingof the word wt becomes at a higher probability a word that appears priorto and subsequent to the word wt in learning data.

In the paper “Distributed Representations of Words and Phrases and theirCompositionality”, the computation of the conditional appearanceprobability of formula (2) is modeled in a three-layer neural network.FIG. 6 illustrates an example of the configuration of the neural networkused to calculate a probability of appearance.

The neural network of FIG. 6 is an example in which c=2 in formula (2).More specifically, a link state of the layers forming the neural networkis learned such that the conditional appearance probability related to atotal of four words wt−2, wt−1, wt+1, and wt+2, namely, two words priorto the word wt and two words subsequent to the word wt is maximized.

Referring to FIG. 6, an input layer 601 receives the word wt. Forexample, in text data “kyou/no/tenki/wa/yoku/naru/yohou/ga/dete/iru”(the weather forecast says it's fine today) as illustrated in FIG. 7,let the word “yoku” in the words to be the word wt, and a vectorcorresponding to the word “yoku” is input to the input layer 601.

The vector corresponding to the word wt is expressed in a 1-of-K format.If the number of types of words appearing in the text corpus of learningdata is K, the dimension of a t-th vector of K dimensions correspondingto t-th word with K words lined up (t is an integer equal to or below K)is “1”, and the other elements have “zero”. This is called 1-of-Kformat.

The text corpus of a large size is typically the learning data. Thenumber of types of words ranges from tens of thousands to hundreds ofthousands, and the word wt is represented by a vector of tens ofthousands to hundreds of thousands of dimensions. For example, thenumber of types of words is about 200,000 in Japanese newspaperarticles. If the newspaper articles are the learning data, the word wtis represented by a vector of about 200,000 dimensions. If the word wtis represented by a vector of K dimensions, the input layer 601 includesK nodes.

FIG. 8 illustrates an example of the word wt represented by a 1-of-Kvector. Referring to FIG. 8, the words “tenki”, “wa”, “yoku”, “naru”,and “yohou” are represented by 1-of-K vectors. For example, let the word“tenki” be a word lined up at the t-th position from among the K wordsserving as the learning data. The t-th dimension only is “1”, and “0” isassigned to the other dimensions. Since “wa” follows “tenki”, (t+1)-thelement is “1”, and “0” is assigned to the other elements. The otherwords are also represented by 1-of-K vectors. Since a vector is assignedto each word such that the location of appearance of “1” is different.The semantic vector learner 204 thus differentiates the words inaccordance with the location where “1” appears. The arrangement of the Kwords is not limited to any particular method. The K words may be in theorder of appearance in the text corpus or in a random order.

Referring to FIG. 6, the elements of the vectors input to the inputlayer 601 are combined in a weighted linear manner, and the resultingscalar quantity is converted into a layer of vectors using an activationfunction. The layer of vectors is the hidden layer 602.

The number of dimensions of the vector in the hidden layer 602 may beset to any value. The number of dimensions typically set is smaller thanthe number of dimensions (K dimensions) of the vector at the input layer601. In the technique disclosed in the paper “DistributedRepresentations of Words and Phrases and their Compositionality”, thenumber of dimensions of the vector at the hidden layer 602 is 200dimensions as a default value.

Referring to FIG. 6, the output layers 603A, 603B, 603C, and 603D arevector layers that are obtained by combining the elements of the vectorsat the hidden layer 602 in the weighted linear manner, and convertingthe resulting scalar values using a Softmax function. The output layers603A, 603B, 603C, and 603D respectively represent appearance probabilitydistributions of the words wt−2, wt−1, wt+1, and wt+2. If the number oftypes of words included in the text corpus is K, the vectors of theoutput layers 603A, 603B, 603C, and 603D have respectively K dimensions.The value of a k-th element indicates the appearance probability of thek-th word wk.

X represents a vector at the input layer 601, H represents a vector atthe hidden layer 602, and Y(−2), Y(−1), Y(+1), and Y(+2) respectivelyrepresent vectors at the output layers 603A, 603B, 603C, and 603D.Formula (3) derives the vector H from the vector X, and formula (4)derives an i-th element of the vectors Y(−2), Y(−1), Y(+1), and Y(+2)from the vector H.

$\begin{matrix}{H = {W^{XH} \cdot X}} & (3) \\{Y_{i{(j)}} = \frac{\exp \left( {I_{i}^{T} \cdot W_{(j)}^{HY} \cdot H} \right)}{\Sigma_{k}\mspace{14mu} {\exp \left( {I_{k}^{T} \cdot W_{(j)}^{HY} \cdot H} \right)}}} & (4)\end{matrix}$

WXH in formula (3) is a matrix that represents weights used when theelements of the vector X are combined in the weighted linear manner.Vectors li and lk in formula (4) are K dimensional vectors respectivelywith an i-th element and a k-th element at “1”, and other elementshaving “0”.

Weighting matrix W(j) HY of formula (4) represents weights used when thevector H is combined in a weighted linear manner. The numerator offormula (4) represents an exponential function value with an argumentthat results from linear combining the vector H with i-th row vector ofthe weighting matrix W(j) HY. The denominator of formula (4) is the sumof exponential function values with arguments that result from linearcombining the vector H with the first row to K-th row vectors of theweighting matrix W(j) HY.

FIG. 9 illustrates the neural network of FIG. 6 using the vectors X, H,Y(−2), Y(−1), Y(+1), and Y(+2). Using the neural network thus organized,the semantic vector learner 204 determines the values of a matrixrepresenting weights through backpropagation learning, with the word wtappearing in the text data in the text corpus as an input teacher signaland the word wt+j (−c≤j≤c, and j≠0) as an output teacher signal.

If the semantic vector learner 204 is constructed in accordance with themethod disclosed in the paper “Distributed Representations of Words andPhrases and their Compositionality”, the weighting matrix WXH is used asthe semantic vector table 207. If each word is expressed in a 1-of-Kvector, the weighting matrix WXH is represented by a matrix of S rowsand K columns. S is the number of dimensions of the vector at the hiddenlayer 602.

A j-th column of the weighting matrix WXH is a 1-of-K vector, and is asemantic vector with a j-th element being 1. The semantic vector table207 may include in addition to the weighting matrix WXH a tableindicating an association relationship of a word that is assigned toeach column of the weighting matrix WXH.

The weight matrices W(−2)HY, W(−1) HY, W(+1)HY, and W(+1)HY are neededin a learning phase that is based on the backpropagation learning, butbecomes unnecessary when the learning phase is complete. In a use phasewith the semantic vector table 207 used, only the weighting matrix WXHis used.

FIG. 10 is a flowchart illustrating a learning process of the wordsemantic information generation apparatus of the embodiment of thedisclosure.

The semantic vector learner 204 initializes the weighting matrices WXHand WHY of the neural network with random values (step S101). Thesemantic vector learner 204 determines whether the learning process hasconverged with a change in the weighting matrices WXH and WHY throughthe backpropagation learning equal to or below a predetermined value(step S102). If the learning process has converged (yes branch from stepS102), the semantic vector learner 204 ends the learning process. If theweighting matrices WXH and WHY are not below the predetermined values,the semantic vector learner 204 determines that the learning process hasnot converged (no branch from step S102), and then proceeds to stepS103.

The acquisition unit 203 acquires a piece of text data from the textcorpuses as a learning target (step S103). The text corpuses as alearning target are the general text corpus 201 and the antonym textcorpus 202. The acquisition unit 203 may simply extract a piece of textdata from the two text corpuses.

The semantic vector learner 204 varies the values of the weightingmatrices WXH and WHY through the backpropagation learning with the wordwt appearing in the extracted text data as an input teacher signal andthe word wt+j (−c≤j≤c, and j≠0) as an output teacher signal (step S104),and then returns to step S102.

The semantic vector learner 204 is extracting the text data one piece byone piece from the text corpus as the learning target until the changein the value the weighting matrices WXH and WHY becomes lower than thethreshold value. Even if all the text data is extracted from the textcorpus as the learning target, the learning process may not converge. Insuch a case, the acquisition unit 203 extracts the text data, startingwith first text data again. In other words, the text data is cyclicallyextracted from the text corpus as the learning target in the learningprocess to converge the values of the weighting matrices WXH and WHY.

As described above, the semantic vector learner 204 receives a givenword with the text data in the text corpus as a teacher signal, modifiesthe weighting matrix of the neural network such that the appearanceprobability of words prior to and subsequent to that input word becomeshigher, thereby learning the semantic vector to be assigned to thatword. From among multiple words included in the text corpus, wordshaving word strings appearing prior thereto or subsequent thereto andbeing mutually similar to each other in meaning may be naturally similarin semantic vector that are learned. This is because the learningprocess is performed based on the distribution hypothesis that wordssimilar to each other in meaning appear in similar contexts.

However, in a real natural language, antonyms also appear with similarcontexts. As described with reference to the general text corpuses 201Cand 201D of FIG. 4, the contexts of the words in an antonym relationshiphave frequently identical or similar word strings prior thereto orsubsequent thereto. If the learning process based on the distributionhypothesis is performed on a text corpus collected in an ordinary mannerand serving as the learning data, the semantic vectors assigned to thewords in an antonym relationship are similar, and it is difficult toclearly differentiate one word from another.

FIG. 11 is a graph in which semantic vectors assigned to the word “appu”and the word “daun” are reduced to two dimensions through a principalcomponent analysis in a semantic vector table of a comparative exampleto the embodiment. The semantic vector table of the comparative exampleis obtained by performing the distribution hypothesis based learningprocess on a text corpus that has been produced by performingmorphological analysis in the Japanese version Wikipedia. As illustratedin FIG. 11, the word “appu” and the word “daun” are closely located andvery close semantic vectors are assigned to the two words.

FIG. 12 is a graph in which semantic vectors assigned to the word “appu”and the word “daun” are reduced to two dimensions through the principalcomponent analysis in the semantic vector table 207 of the embodiment.Referring to FIG. 12, the text corpus produced from the Japanese versionof Wikipedia is used as the general text corpus 201. Used as the antonymtext corpus 202 is the text corpus that is produced for antonymsincluding the word “appu” and the word “daun” such that the contexts ofthe antonyms 202A of FIG. 5 are different. The distribution hypothesislearning is performed on the two text corpuses to produce the semanticvector table 207.

More specifically, the semantic vector table 207 stores a first word anda first vector representing the meaning of the first word in associationwith each other and a second word and a second vector in associationwith each other with the second vector spaced apart by a predetermineddistance or longer from the first vector in a vector space.

As illustrated in FIG. 12, the word “appu” and the word “daun” arespaced much more than those words in FIG. 11. This means thatsubstantially different semantic vectors are assigned to those words.

The word semantic information generation apparatus of the embodimentuses the antonym text corpus 202 in addition to the general text corpus201. The antonym text corpus 202 is generated in a manner such that thecontexts of the words in an antonym relationship are different. Sincethe distribution hypothesis learning process is performed on the twocorpuses, the semantic vector is assigned to each word such that thewords in an antonym relationship are appropriately differentiated.

The disclosure has been discussed with reference to the case in which agiven word and an antonym of the given word are differentiated. Thedisclosure may find applications in the following specific examples.

(1) The first text corpus 101 includes the text data in a naturallanguage used to instruct a device to operate, and the second textcorpus 102 is constructed such that a word related to operation contentsof the device is included as the third word. For example, sentences“please raise the temperature”, “please lower the temperature”, “pleaseturn on the air-condition in the bedroom”, and “please turn on theair-conditioner in the living room” are similar in word string butdifferent in meaning from each other. The instructions intended by thesesentences are thus appropriately differentiated, thereby controlling anerratic operation of the devices.

(2) The first text corpus 101 may include text data in a naturallanguage that a patient uses to describe his or her symptom in a medicaldiagnosis. The second text corpus 102 is constructed such that a wordrelated to a state of the patient's body is included as the third word.In this way, sentences “my head has been hurting for these three days”,and “I have been dizzy for these three days” are similar in word stringbut quite different in meaning. The descriptions of the symptoms areappropriately differentiated, leading to controlling a wrong diagnosis.

(3) The first text corpus 101 may include text data in a naturallanguage that is used to explain a symptom of a patient in a medicaldiagnosis or to treat the symptom. The second text corpus 102 isconstructed such that a word related to a region of the patient's bodyis included as the third word. In this way, sentences “my right hand hasbeen hurting for these three days”, and “my stomach has been hurting forthese three days”, or sentences “cool your head”, and “cool your rightfoot” are similar in word string but different in description of symptomor treatment of symptom. These word strings are appropriatelydifferentiated, reducing the possibility of a wrong diagnosis or a wrongtreatment.

(4) The first text corpus 101 may include text data in a naturallanguage that is used to explain a treatment to a symptom of a patientin a medical diagnosis. The second text corpus 102 is constructed suchthat a word related to contents of the treatment is included as thethird word. In this way, sentences “keep an affected area warm” and“cool an affected area” are similar in word string, but different inmeaning. These word strings are appropriately differentiated, reducing awrong instruction about the treatment.

The use of a semantic information table produced through the learningprocess is described below. FIG. 13 is a block diagram of a homeelectronics device 300 as a first use example of the semanticinformation table.

The home electronics devices 300 include a variety of home electronicsincluding a television, an audio device, a washing machine, anair-conditioner, a refrigerator, and a light.

The home electronics device 300 includes a semantic information table301, a microphone 302, a voice processor 303, an analyzer 304, a commandgenerator 305, and a command execution unit 306. The semanticinformation table 301 is a table that is obtained by learning the firstand second text corpuses 101 and 102 illustrated in FIG. 1, andcorresponds to the semantic information table 107 of FIG. 1.

The microphone 302 converts a voice of a user into an electrical audiosignal and is used to pick up the voice of the user. The voice processor303 analyzes the audio signal output from the microphone 302, andgenerates text data indicating the voice spoken by the user. Theanalyzer 304 analyzes the text data generated by the voice processor 303using the semantic information table 301. The analyzer 304 determinesthe semantic information of each word forming the input text data byreferencing the semantic information table 301. The analyzer 304references the determined semantic information of each word to determinewhether the contents of the voice of the user are related to anoperation of the home electronics device 300. If the contents of thevoice of the user are related to an operation of the home electronicsdevice 300, the analyzer 304 outputs operation information related tothe operation to the command generator 305.

The command generator 305 generates a command to perform an operationindicated by the input operation information, and outputs the command tothe command execution unit 306. The command execution unit 306 executesthe input command. In this way, the home electronics device 300appropriately recognizes the contents of the voice spoken by the userusing the semantic information table 301.

FIG. 14 is a block diagram of a home electronics system as a second useexample of the semantic information table. The home electronic systemhands the function of voice recognition over to a server 500 presentover cloud and operates a home electronics device 400 through voice.

The home electronics device 400 and the server 500 are connected to eachother via a public communication network, such as the Internet.

The home electronics device 400 is identical to the home electronicsdevice 300 described with reference to FIG. 13. In the second example,however, the home electronics device 400 does not perform voicerecognition, and the server 500 thus includes a semantic informationtable 501, a voice processor 502, an analyzer 503, and a commandgenerator 504.

A microphone 401 is identical to the microphone 302 of FIG. 13. A signalprocessor 402 determines whether the audio signal input from themicrophone 401 is noise or not. If the audio signal is not noise, thesignal processor 402 outputs the audio signal to a communication unit404. The communication unit 404 converts the input audio signal into acommunication signal in a communicable format, and then transmits thecommunication signal to the server 500.

A communication unit 505 in the server 500 receives the communicationsignal from the home electronics device 400, extracts the audio signal,and outputs the audio signal to the voice processor 502. As the voiceprocessor 303 of FIG. 13, the voice processor 502 analyzes the inputaudio signal, and generates text data indicating the voice spoken by theuser. As the analyzer 304 of FIG. 13, the analyzer 503 analyzes the textdata generated by the voice processor 502 using the semantic informationtable 501, and outputs operation information to the command generator504.

The command generator 504 generates a command to execute an operationindicated by the input operation information, and then outputs thecommand to the communication unit 505. The communication unit 505converts the input command into a communication signal in a communicableformat, and then transmits the communication signal to the homeelectronics device 400.

The communication unit 404 in the home electronics device 400 receivesthe communication signal, removes a header and the like from thereceived communication signal, and then outputs the resultingcommunication signal to the signal processor 402. If the communicationsignal with the header removed therefrom is a command to the homeelectronics device 400, the signal processor 402 outputs that command tothe command execution unit 403. The command execution unit 403 executesthe input command.

In the home electronics system of FIG. 14, the server 500 appropriatelyrecognizes the contents of the operation spoken by the user, using thesemantic information table 501 that has been generated through thelearning process, and then transmits the command to the home electronicsdevice 400.

The word semantic information generation apparatus of the disclosurefinds applications in the treatment of the meaning of a natural languagetext. For example, the word semantic information generation apparatus isapplicable to searching for sentences similar in meaning, performing aword interchanging process, or semantically sorting spoken sentences inan interactive system.

What is claimed is:
 1. A method for controlling a device, comprising:acquiring text data indicating a voice spoken by a user; analyzing ameaning of the text data based on a table in which a word and a vectorrepresenting a meaning of the word in a vector space of predetermineddimensions are associated; and generating a command to control thedevice based on the analyzed meaning of the text data, wherein the tableis generated by performing a learning process by assigning to a firstword a first vector representing a meaning of the first word in thevector space and by assigning to a second word a second vectorrepresenting a meaning of the second word in the vector space, inaccordance with an arrangement of a word string in a first text corpusand a second text corpus, wherein the first text corpus includes firsttext data of a first sentence, including the first word and described ina natural language, and second text data of a second sentence, includingthe second word different in meaning from the first word, with a secondword distribution indicating types and frequencies of words appearingwithin a predetermined range prior to and subsequent to the second wordbeing similar to a first word distribution within the predeterminedrange prior to and subsequent to the first word in the first sentence,and wherein the second text corpus includes third text data of a thirdsentence, including a third word identical to at least one of the firstword and the second word, with a third word distribution within thepredetermined range prior to and subsequent to the third word being notsimilar to the first word distribution.
 2. The method according to claim1, wherein the second text corpus includes the third word and a fourthword that is artificially produced and does not appear in text data ofthe natural language, and wherein a word included in the predeterminedrange prior to and subsequent to the third word is the fourth word inthe third text data.
 3. The method according to claim 1, wherein thefirst text data and the second text data include a word in a firstlanguage, and wherein in the third text data, the third word is a wordin the first language, and a word within the predetermined range priorto and subsequent to the third word is a word in a second languagedifferent from the first language.
 4. The method according to claim 1,wherein the second word is an antonym of the first word.
 5. The methodaccording to claim 1, wherein the second word is similar in meaning tothe first word, but different in terms of a degree of similarity fromthe first word.
 6. The method according to claim 1, wherein the secondword is identical in concept to the first word, but different inattribute from the first word.
 7. The method according to claim 1,wherein the learning process is performed using a neural network.
 8. Themethod according to claim 1, wherein the learning process is performedusing latent semantic indexing.
 9. The method according to claim 1,wherein the learning process is performed using probabilistic semanticindexing.
 10. The method according to claim 1, wherein the vector spaceof the predetermined dimensions has a number of dimensions equal to anumber of different types of words appearing in the first text corpusand the second text corpus.
 11. The method according to claim 1, whereinthe first text corpus includes text data in the natural language that isused to instruct a device to perform an operation, and wherein the thirdword is related to contents of the operation of the device.
 12. Themethod according to claim 1, further comprising: receiving audio signalof speech spoken by a user; and generating the text data from the audiosignal of the speech spoken by the user.
 13. An apparatus forcontrolling a device, comprising: a memory; and a processor that, inoperation, performs operations including acquiring text data indicatinga voice spoken by a user; analyzing a meaning of the text data based ona table in which a word and a vector representing a meaning of the wordin a vector space of predetermined dimensions are associated; andgenerating a command to control the device based on the analyzed meaningof the text data, wherein the table is generated by performing alearning process by assigning to a first word a first vectorrepresenting a meaning of the first word in the vector space and byassigning to a second word a second vector representing a meaning of thesecond word in the vector space, in accordance with an arrangement of aword string in a first text corpus and a second text corpus, wherein thefirst text corpus includes first text data of a first sentence,including the first word and described in a natural language, and secondtext data of a second sentence, including the second word different inmeaning from the first word, with a second word distribution indicatingtypes and frequencies of words appearing within a predetermined rangeprior to and subsequent to the second word being similar to a first worddistribution within the predetermined range prior to and subsequent tothe first word in the first sentence, and wherein the second text corpusincludes third text data of a third sentence, including a third wordidentical to at least one of the first word and the second word, with athird word distribution within the predetermined range prior to andsubsequent to the third word being not similar to the first worddistribution.
 14. A non-transitory computer-readable recording medium,including a program that causes a computer to execute a method, theprogram, when executed by the computer, causing the computer to executeoperations including: acquiring text data indicating a voice spoken by auser; analyzing a meaning of the text data based on a table in which aword and a vector representing a meaning of the word in a vector spaceof predetermined dimensions are associated; and generating a command tocontrol the device based on the analyzed meaning of the text data,wherein the table is generated by performing a learning process byassigning to a first word a first vector representing a meaning of thefirst word in the vector space and by assigning to a second word asecond vector representing a meaning of the second word in the vectorspace, in accordance with an arrangement of a word string in a firsttext corpus and a second text corpus, wherein the first text corpusincludes first text data of a first sentence, including the first wordand described in a natural language, and second text data of a secondsentence, including the second word different in meaning from the firstword, with a second word distribution indicating types and frequenciesof words appearing within a predetermined range prior to and subsequentto the second word being similar to a first word distribution within thepredetermined range prior to and subsequent to the first word in thefirst sentence, and wherein the second text corpus includes third textdata of a third sentence, including a third word identical to at leastone of the first word and the second word, with a third worddistribution within the predetermined range prior to and subsequent tothe third word being not similar to the first word distribution.